﻿using NHibernate;
using Ninject.Modules;
using ProgressTracker.Data.Abstract;
using ProgressTracker.Data.Concrete;

namespace ProgressTracker.Dependencies
{
    public class DataModule : NinjectModule
    {
        public override void Load()
        {
            Bind<ISession>().ToMethod(ctx => SessionProvider.SessionFactory.OpenSession());
            Bind<IDayRepository>().To<DayRepository>();
            Bind<ITaskRepository>().To<TaskRepository>();
            Bind<IUserRepository>().To<UserRepository>();
        }
    }
}
